package cn.gcjxsc.consts.merchant;

/**
 * @author pumbaa
 * @since 1.0
 */
public enum MerchantAccountType {
    /**
     * 可提现现金
     */
    CASH(101),
    /**
     * 微信红包金额
     */
    WX_CASH(102);

    private int type;

    MerchantAccountType(int type) {
        this.type = type;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public static MerchantAccountType fromCode(int type) {
        MerchantAccountType[] values = MerchantAccountType.values();
        for (MerchantAccountType value : values) {
            if (value.getType() == type) {
                return value;
            }
        }
        return null;
    }
}
